home *** CD-ROM | disk | FTP | other *** search
/ Champak 141 / (Vol 141) Oct 17 2011.iso / Games / Clueless.swf / scripts / Powerup.as < prev    next >
Encoding:
Text File  |  2011-10-17  |  1.2 KB  |  55 lines

  1. package
  2. {
  3.    import Forms.DressupForm;
  4.    import flash.display.SimpleButton;
  5.    
  6.    public class Powerup extends SimpleButton
  7.    {
  8.        
  9.       
  10.       protected var _sDescription:String = "Does nothing";
  11.       
  12.       protected var _sName:String = "Base Powerup";
  13.       
  14.       protected var _iCharges:int = 1;
  15.       
  16.       public function Powerup()
  17.       {
  18.          _sName = "Base Powerup";
  19.          _sDescription = "Does nothing";
  20.          _iCharges = 1;
  21.          super();
  22.       }
  23.       
  24.       public function init(param1:DressupLevelInfo) : void
  25.       {
  26.       }
  27.       
  28.       public function get Charges() : int
  29.       {
  30.          return _iCharges;
  31.       }
  32.       
  33.       public function spawn() : Powerup
  34.       {
  35.          return new Powerup();
  36.       }
  37.       
  38.       public function get PowerupDescription() : String
  39.       {
  40.          return _sDescription;
  41.       }
  42.       
  43.       public function get PowerupName() : String
  44.       {
  45.          return _sName;
  46.       }
  47.       
  48.       public function activate(param1:Array, param2:Array, param3:DressupForm, param4:DressupLevelInfo) : void
  49.       {
  50.          --_iCharges;
  51.          ++Profile.CurrentProfile.PowerupsUsed;
  52.       }
  53.    }
  54. }
  55.